@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* 动画 */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.fade-in-up {
	animation: fadeInUp 0.5s ease-out forwards;
}

/* 容器和背景 */
.square-container {
	padding: 20px;
	background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.mobile .square-container {
	padding: 15px;
}
.background-overlay {
	position: absolute;
	top: -50px;
	right: -80px;
	width: 250px;
	height: 250px;
	background: linear-gradient(45deg, rgba(123, 104, 238, 0), rgba(123, 104, 238, 0.1));
	border-radius: 50%;
	z-index: 0;
}

/* 头部 */
.header {
	padding: 10px 5px;
	margin-bottom: 15px;
	position: relative;
	z-index: 1;
}
.header-title-container {
	display: flex;
	align-items: center;
	gap: 15px;
}
.header-icon {
	font-size: 32px;
	color: #7B68EE;
	background: white;
	padding: 12px;
	border-radius: 50%;
	box-shadow: 0 4px 15px rgba(123, 104, 238, 0.2);
}
.header-title {
	font-size: 24px;
	font-weight: 600;
	color: #333;
	margin: 0;
}
.header-subtitle {
	font-size: 14px;
	color: #888;
	margin: 2px 0 0 0;
}

.post-btn {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	padding: 8px 16px;
	background: linear-gradient(45deg, #7B68EE, #9370DB);
	color: white;
	border: none;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
	transition: all 0.3s ease;
}

.post-btn:active {
	transform: translateY(-50%) scale(0.95);
	box-shadow: 0 2px 8px rgba(123, 104, 238, 0.2);
}

/* 筛选条 */
.filter-bar {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	background: white;
	padding: 8px;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.filter-btn {
	flex: 1;
	padding: 10px;
	font-size: 15px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #555;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	transition: all 0.3s ease;
}
.filter-btn.active {
	background: #7B68EE;
	color: white;
	box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

/* 动态列表 */
.posts-list {
	flex: 1;
	height: 100%; /* For scroll-view */
}
.post-card {
	background: #fff;
	border-radius: 16px;
	padding: 15px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.07);
	margin-bottom: 15px;
}
.mobile .post-card {
	padding: 12px;
}

.post-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}
.post-author {
	display: flex;
	align-items: center;
	gap: 10px;
}
.post-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}
.author-info {
	display: flex;
	flex-direction: column;
}
.author-name {
	font-size: 16px;
	font-weight: 600;
	color: #333;
}
.post-time {
	font-size: 12px;
	color: #999;
}

.post-content {
	font-size: 15px;
	color: #444;
	line-height: 1.6;
	padding: 5px 0 15px 0;
}

.post-actions {
	display: flex;
	gap: 20px;
	padding-top: 12px;
	border-top: 1px solid #f5f5f5;
}
.post-action {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #888;
	font-size: 14px;
	background: none;
	padding: 5px;
}
.post-action.liked {
	color: #ff6b81;
	font-weight: bold;
}
.post-action i {
	font-size: 18px;
} 

/* 发布动态模态框 */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.modal-content {
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #eee;
}

.modal-header h3 {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	color: #999;
	cursor: pointer;
}

.post-textarea {
	width: 100%;
	height: 150px;
	padding: 20px;
	border: none;
	font-size: 16px;
	resize: none;
	outline: none;
	box-sizing: border-box;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	padding: 20px;
	gap: 10px;
	border-top: 1px solid #eee;
}

.cancel-btn, .submit-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	cursor: pointer;
}

.cancel-btn {
	background: #f5f5f5;
	color: #666;
}

.submit-btn {
	background: linear-gradient(45deg, #7B68EE, #9370DB);
	color: white;
}